/**
 * 
 */
package assig2;

import java.util.Date;

/**  A class for holding 3-dimensional art objects
 * @author wangqy
 *
 */
public class Sculpture extends Art{
	protected double height; // Horizontal dimension in inches
	protected double width;  // Vertical dimension in inches
	protected double depth; // Depth dimension in inches

	
	/**
	 * @return the height
	 */
	public double getHeight() {
		return height;
	}

	/**
	 * @return the width
	 */
	public double getWidth() {
		return width;
	}

	/**
	 * @return the depth
	 */
	public double getDepth() {
		return depth;
	}

	/**
	 * @param height the height to set
	 */
	public void setHeight(double height) {
		this.height = height;
	}

	/**
	 * @param width the width to set
	 */
	public void setWidth(double width) {
		this.width = width;
	}

	/**
	 * @param depth the depth to set
	 */
	public void setDepth(double depth) {
		this.depth = depth;
	}

	/** Default constructor
	 * 
	 */
	Sculpture() {	
	// Note: Default constructor of parent is invoked automatically
	height = 0.0;
	width = 0.0;
	depth = 0.0;
	}

	/** A more complete constructor!
	 * @param creationDate
	 * @param ownerName 
	 * @param ownerId
	 * @param height Vertical dimension in inches
	 * @param width Horizontal dimesnion in inches
	 * @param depth dimension in inches
	 */
	Sculpture(Date creationDate, String ownerName, long ownerId,
			double height, double width, double depth) {
		super(creationDate, ownerName, ownerId);
		this.height = height;
		this.width = width;
		this.depth = depth;
	}
	
	/**
	 * @return String version of the object
	 */
	public String toString() {
		String s; // Return string to construct;
		s = super.toString(); // Invoke toString() of parent class
		s = s + " Height = " + height + " inches, Width = " 
			+ width + " inches, Depth = " + depth +" inches. Volume = " + volume() + " cubic inches" ;
		return s;
	}
	
	/**
	 * @return volume of the object
	 */
	public double volume() {
		return this.height * this.width * this.depth;
	}
}